package com.selftool.gui.serverframe.action;

import com.selftool.base.NCButton;
import com.selftool.bo.DosBO;
import com.selftool.log.Logger;
import com.selftool.util.CommonUtil;

/**
 * 打开sysconfig按钮
 */
public class SysConfigButton extends NCButton {
    /**
     * @param obj
     * @throws Exception
     */
    @Override
    protected void execute(Object obj) throws Exception {
        boolean isWindows = CommonUtil.isWindows();
        String command = "";
        if(isWindows){
            command = "call "+ CommonUtil.getParameter("homepath")+"\\bin\\sysConfig.bat";
        }else{
            command = "/"+CommonUtil.getParameter("homepath")+"/bin/sysConfig.sh";
        }
        Logger.write("start:"+command);
        new DosBO().exec(command);
    }
}
